﻿using Himp.Base;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Volo.Abp;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Guids;
using Volo.Abp.MultiTenancy;

namespace Himp.Outpatient
{
    /// <summary>
    /// 门诊挂号类别
    /// </summary
    public class OtpRgstType : Entity<Guid>, IMultiTenant, ISoftDelete
    {
        /// <summary>
        /// 门诊挂号类别编码
        /// </summary>
        public string OtpRgstTypeCodg { get; set; }

        /// <summary>
        /// 门诊挂号类别名称
        /// </summary>
        public string OtpRgstTypeName { get; set; }

        /// <summary>
        /// 标准字典表
        /// </summary>
        public string DataDictCode { get; set; }

        /// <summary>
        /// 标准字典表
        /// </summary>
        public string DataDictName { get; set; }

        /// <summary>
        /// 医疗类别代码
        /// 标准字典表
        /// </summary>
        public string MedTypeCode { get; set; }

        /// <summary>
        /// 医疗类别名称
        /// 标准字典表
        /// </summary>
        public string MedTypeName { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public bool ValiFlag { get; set; }

        /// <summary>
        /// 金额
        /// </summary>
        public decimal Amt { get; set; }

        /// <summary>
        /// 门诊挂号类别对应公共项目
        /// </summary>
        public List<OtpRgstTypeAssocPubItem> OtpRgstTypeAssocPubItems { get; set; }

        /// <summary>
        /// 删除标志
        /// </summary>
        public bool IsDeleted { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Guid? TenantId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="guidGenerator"></param>
        public void CreateTypeAsChargeItemId(IGuidGenerator guidGenerator)
        {
            foreach (var item in OtpRgstTypeAssocPubItems)
            {
                //item.SetId(guidGenerator.Create());
            }
        }

        public void ChangeRegType(string label)
        {
            OtpRgstTypeName = label;
        }
    }
}
